package com.sg.dto.integration.component;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Objects;


/**
 * @desc CycleTypeDto
 * @使用场景
 */
@Data
public class CycleTypeDto extends BaseDto implements Serializable {

    /**
     * 周期类型
     */
    @NotNull(message = "周期类型不能为空")
    @ApiModelProperty("周期类型")
    private String cycleType;

    /**
     * 排序
     */
    @NotNull(message = "排序不能为空")
    @ApiModelProperty("排序")
    private Long orderNumber;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        CycleTypeDto that = (CycleTypeDto) o;
        return cycleType == that.cycleType && orderNumber == that.orderNumber;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), cycleType, orderNumber);
    }


}
   